FROM postgres:{{.upstream_version}}

ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

{{if .pgagent}}
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list && \
    sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list && \
    apt-get update && \
    apt-get install -y pgagent tzdata ca-certificates vim curl procps net-tools unzip telnet && \
    rm -rf /var/lib/apt/lists/*
{{end}}
